package org.dromara.system.domain.bo.cone;

import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

@Data
public class ConePushBo {

    private String spayid;
    private String sign;
    private String token;
    private String token_id;
    private String amount;
    private String currency;
    private String ip;
    private String email;
    private String phone;
    private Object ixun_number;
    private String ixun_expiry;
    private Object ixun_cvc;
    private String shipping_firstname;
    private String shipping_lastname;
    private String shipping_company;
    private String shipping_address_1;
    private String shipping_address_2;
    private String shipping_postcode;
    private String shipping_city;
    private String shipping_state;
    private String shipping_country;
    private String billing_firstname;
    private String billing_lastname;
    private String billing_company;
    private String billing_address_1;
    private String billing_address_2;
    private String billing_postcode;
    private String billing_city;
    private String billing_state;
    private String billing_country;
    private String site;
    private String order_id;
    private String order_created_at;
    private int tag;
    private String user_agent;
    private Meta meta;
    private String fang_orderid;
    private String fang_ordersn;
    private String notifyUrl;
    private String id;
    private String money_pro;
    private String money_total;
    private String money_shipping;
    private String money_payfee;
    private String money_other;
    private String money_discount;
    private String content;
    private String money_type;
    private String customer_info;
    private String request_url;
    private long time;

    @Data
    public static class Meta {
        private String site_title;
        private List<OrderProduct> order_products;
        private List<OrderTotal> order_totals;

        @Data
        public static class OrderProduct {
            private String name;
            private String image;
            private List<Object> attr;
            private int qty;
            private BigDecimal itemprice;
            private String id;
            private String sku;
            private String url;
            private BigDecimal subtotal;
        }
        @Data
        public static class OrderTotal {
            private String label;
            private String value;

            public OrderTotal(String label, String value){
                this.label = label;
                this.value = value;
            }
        }
    }
}
